﻿#include "MaterialUnlitNodeViewModel.h"

#include "MaterialGraph/UnlitNode/MaterialUnlitNodeModel.h"
#include "MaterialGraph/Pin/MaterialGraphPinViewModel.h"

void RMaterialUnlitNodeViewModel::BindModel(TSharedObjectPtr<RMaterialGraphNodeModel> InModel, TSharedObjectPtr<RMaterialGraphViewModel> InGraph)
{
    Super::BindModel(InModel, InGraph);
    UnlitModel = InModel;

    //assign the pin line index
    InputViewModels[0]->SetLineIndex(1);
    InputViewModels[1]->SetLineIndex(2);
}

SColor RMaterialUnlitNodeViewModel::GetTitleBackgroundColor() const
{
    return GetOutputNodeTitleBackgroundColor();
}

CString RMaterialUnlitNodeViewModel::GetInputPinName(int64_t Index) const
{
    switch(Index)
    {
        case 0:
            return U"颜色";

        case 1:
            return U"透明度";
    
        default:
            assert(false);
            return U"未命名引脚";

    }

}